<template>
	<view class="content">
		<view class="charts-box">
			<qiun-data-charts type="line" :chartData="chartsDataLine1" :ontouch="true" :opts=" {
					enableScroll: true,
					dataLabel: false,
					xAxis: {
						axisLine: false,
						scrollShow: true,
						itemCount: 4,
						disableGrid: true,
						scrollShow: false
					},
					dataPointShape: false,
					legend: {
						show: false
					},
					yAxis: {
						disabled: false,
						data: [{
							position: 'left',
							disabled: false,
							axisLine: false,
							tofix: 2,
							unit: '%'}],
					}}" />
		</view>
	</view>
</template>

<script>
	export default {
		props: ['days', 'newData'],
		name: "mychart",
		computed: {
			chartsDataLine1() {
				return {
					"categories": [...this.days],
					"series": [{
							"name": "",
							"data": [...this.newData]
						},

					]
				}
			}
		},
		data() {
			return {


			};
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		flex: 1;
	}

	.charts-box {
		width: 100%;
		height: 300px;
	}
</style>
